package com.heima.model.wemedia.dtos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "自媒体登录实体")
public class WmUserDto {

    /**
     * 用户名
     */
    @ApiModelProperty(value = "姓名")
    @NotNull(message = "用户名不能为空")
    @NotBlank(message = "用户名不能为空")
    private String name;

    /**
     * 密码
     */
    @NotNull(message = "密码不能为空")
    @Length(min = 5,max = 20,message = "密码长度在5-20个长度")
    @ApiModelProperty(value = "密码")
    private String password;
}